package com.lx.design.demo.ddd3.oop.monster;

import com.lx.design.demo.ddd3.oop.player.Player;
import com.lx.design.demo.ddd3.oop.weapon.Weapon;
import lombok.Data;

/**
 * @author lx
 * @date 2021/4/21 16:09
 */
@Data
public abstract class Monster {
    String name;
    Long health;
    public void receiveDamageBy(Weapon weapon, Player player){
        //基础规则
        this.health -= weapon.getDamage();
    }

}
